#pragma once
#include <d3dx9.h>
class Sprite;
class Box;

enum ObjectType
{

	ObjPlayer,//, ObjBlockHouse, ObjGif, ObjBullet, ObjIS, ObjBridge, ObjStandSniper,ObjSniper, ObjDefenseCannon, ObjGrenade, ObjCannon, ObjWallTurret, ObjRock, ObjFire	
	ObjBullet,
	ObjEffect,
	ObjBulletEnemy,
	ObjBulletPlayer,
	ObjEnemy_DYNAMID,
	ObjEnemy_STATIC,
	ObjBarracks,
	ObjGrenade,
	DEBUG_GAME,
	MACHINE

};

class Object
{
protected:
	
	ObjectType _obj;
	Sprite* _sprite;
	float delay;
	int _hits;
	Box* _boundBox;
	Box* _colBox;
	bool _isAlive;
public:
	Box* _box;	
	virtual void init();
	virtual void update();
	virtual void render();	
	virtual Box* getCollisionBox() = 0;
	Object(Box* box);		
	Box* getBox();
	ObjectType getObjectType();
	Object(Box* box, ObjectType obj);
	~Object(void);
	void collide();
	void collide(int damage);
	bool isAlive();
	Box* getBoundBox();
};

